package com.tesisutn.restsoft.resultado;

import java.util.ArrayList;
import java.util.List;

public class Row {
    private List<String> data;
    private boolean selected;

    public Row(){
        data = new ArrayList<String>();
    }

    public Row(String onlyDatum){
        this();
        data.add(onlyDatum);
    }

    public Row add(String datum){
        data.add(datum);
        return this;
    }

    public Row addIn(int index, String datum){
        data.add(index, datum);
        return this;
    }

    public Row remove(String datum){
        data.remove(datum);
        return this;
    }

    public Row removeAt(int index){
        data.remove(index);
        return this;
    }

    public boolean isSelected() {
        return selected;
    }

    public Row setSelected(boolean selected) {
        this.selected = selected;
        return this;
    }

    public String getValueAt(int index){
        return data.get(index);
    }

    public Iterable<String> getData(){
        return data;
    }
}
